import {fetch} from 'utils/fetch';


/****
 * 查询产品信息
 * @param data
 * @returns {*}
 */
export function queryProductInfo(data) {
  return fetch({
    url: '/product/queryProductInfo',
    method: 'post',
    data
  });
}
/****
 * 查询可贷金额和在贷金额(过时)
 * @param data
 * @returns {*}
 */
export function queryDrawdownSum(data) {
  return fetch({
    url: '/drawdown/queryDrawdownSum',
    method: 'post',
    data
  });
}

/****
 * 查询客户经理
 * @param data
 * @returns {*}
 */
export function queryManagerQuery() {
  return fetch({
    url: '/certification/managerQuery',
    method: 'post'
  });
}



/***
 * 获取ticket图片
 * @returns {*}
 */
export function ticketImg(ticket) {
  return fetch({
    url: '/img/ticket/'+ticket,
    method: 'post'
  });
}


/****
 * 查询授信额度及在贷金额
 * @param data
 * @returns {*}
 */
export function queryCreditLine(applyCode) {
  return fetch({
    url: '/credit/queryCredit/'+applyCode,
    method: 'post'
  });
}


/***
 * 查询授信记录，额度
 * @param data
 * @returns {*}
 */
export function queryCreditInfo(data) {
  return fetch({
    url: '/common/queryCreditInfo',
    method: 'post',
    data: data
  });
}


/***
 * 重新推荐
 * @returns {*}
 */
export function reCreditApply(data) {
  return fetch({
    url: '/common/reCreditApply?productCode='+data,
    method: 'post',
  });
}


/***
 * 查询授信记录，额度
 * @param data
 * @returns {*}
 */
export function queryCanLoanAmount(data) {
  return fetch({
    url: '/common/queryCanLoanAmount',
    method: 'post',
    data: data
  });
}

/***
 * 查询授信资方产品列表
 * @param data
 * @returns {*}
 */
export function queryProducting(uscCode) {
	return fetch({
		url: '/product/queryProducting?uscCode='+uscCode,
		method: 'post'
	});
}


/***
 * 查询还款列表
 * @param data
 * @returns {*}
 */
export function repayList(data) {
	return fetch({
		url: '/repayment/repaymentList',
		method: 'post',
		data: data
	});
}

/***
 * 查询
 * 浙商支用列表
 * @param data
 * @returns {*}
 */
export function zsLoanList(data) {
	return fetch({
		url: '/drawdown/drawdownWMRList',
		method: 'post',
		data: data
	});
}
/***
 * POST 支用申请
 * @param data
 * @returns {*}
 */
export function drawdown(data) {
	return fetch({
		url: '/drawdown/drawdown',
		method: 'post',
		data: data
	});
}
/***
 * POST 获取ip地址信息
 * @param data
 * @returns {*}
 */
export function getIpAdress() {
	return fetch({
		url: '/product/getIpAdress',
		method: 'post'
	});
}
/***
 * POST 查询用户KYC
 * @param data
 * @returns {*}
 */
export function queryUserKyc(uscCode) {
	return fetch({
		url: '/certification/getUserInfo?uscCode='+uscCode,
		method: 'post'
	});
}
/***
 * POST 查询账户是否为锁定状态(外贸融)
 * @param data
 * @returns {*}
 */
export function queryLocking(uscCode) {
	return fetch({
		url: '/user/queryLocking?uscCode='+uscCode,
		method: 'post'
	});
}
/***
 * POST 查询还款
 * @param data
 * @returns {*}
 */
export function queryWMRRepaymentRecord(data) {
	return fetch({
		url: '/repayment/queryWMRRepaymentRecord',
		method: 'post',
		data
	});
}
/***
 * POST 查询还款
 * @param data
 * @returns {*}
 */
export function creditApplyAgain(fundCode,uscCode,productCode) {
	return fetch({
		url: '/credit/creditApplyAgain?fundCode='+fundCode+'&uscCode='+uscCode+'&productCode='+productCode,
		method: 'post'
	});
}

/***
 * POST 埋点
 * @param data
 * @returns {*}
 */
export function eventTracking(data) {
	return fetch({
		url: '/eventTracking/add',
		method: 'post',
		data
	});
}

/***
 * POST 宁波银行二维码
 * @param data
 * @returns {*}
 */
export function queryQrCodeCountInfo(uscCode,productCode) {
	return fetch({
		url: '/credit/queryQrCodeCountInfo?uscCode='+uscCode+'&productCode='+productCode,
		method: 'post'
	});
}

